<?php

class Benservi_Forms_MeusDados extends Zend_Form{

    public function init()
    {
                
        $nome = new Zend_Form_Element_Text('nome');
        $nome->setLabel('Nome')
             ->setRequired(true)             
             ->setOptions(array('class' => 'lf'));

        $nome->setDecorators(array(
                   'ViewHelper',
                  'Description',
                  array('Label', array('tag' => null)),
                  array('HtmlTag', array('tag' => 'p')),
           ));

        $email = new Zend_Form_Element_Text('email');
        $email->setLabel('Email')
              ->setRequired(true)
              ->addValidator('EmailAddress')
              ->setOptions(array('class' => 'lf'));

        $email->setDecorators(array(
                   'ViewHelper',
                  'Description',
                  array('Label', array('tag' => null)),
                  array('HtmlTag', array('tag' => 'p')),
           ));

        $passwords = new Zend_Form_Element_Text('oldPasswords');
        $passwords->setLabel('Password Antigo')
                  ->setRequired(true)
                  ->setOptions(array('class' => 'input-m'));

        $passwords->setDecorators(array(
                   'ViewHelper',
                  'Description',
                  array('Label', array('tag' => null)),
                  array('HtmlTag', array('tag' => 'p')),
           ));


        $passwordsNew = new Zend_Form_Element_Text('novoPasswords');
        $passwordsNew->setLabel('Novo Password')
              ->setRequired(true)              
              ->setOptions(array('class' => 'input-m'));

        $passwordsNew->setDecorators(array(
                   'ViewHelper',
                  'Description',
                  array('Label', array('tag' => null)),
                  array('HtmlTag', array('tag' => 'p')),
           ));

        $passwordsRep = new Zend_Form_Element_Text('repetirPasswords');
        $passwordsRep->setLabel('Repetir Password')
              ->setRequired(true)
              ->setOptions(array('class' => 'input-m'));

        $passwordsRep->setDecorators(array(
                   'ViewHelper',
                  'Description',
                  array('Label', array('tag' => null)),
                  array('HtmlTag', array('tag' => 'p')),
           ));

        $bnt = new Zend_Form_Element_Submit('Salvar');

        $bnt->setDecorators(array(
                   'ViewHelper',
                  'Description',                  
           ));

        $bnt->setAttrib('class', 'button-left');

          $this->setDecorators(array(
               'FormElements',
               array(array('data'=>'HtmlTag'),array('tag'=>'p', 'class' => 'main')),
               'Form'
       ));
        $this->removeDecorator('Erros');

        $this->addElements(array($bnt, $nome, $email, $passwords, $passwordsNew, $passwordsRep));       
    }

}

?>
